Low salinity water flooding: estimating relative permeability and capillary pressure using coupling of particle swarm optimization and machine learning technique

The reservoir’s properties are required for proper reservoir simulation, which also involves uncertainties. Experimental methods to estimate the relative permeability and capillary pressure data are expensive and time-consuming. This study aims to determine the relative permeability and capillary pressure functions of a sandstone core in the presence and absence of clay during low-salinity water floods. The data were provided by automatic history matching the results from previously lab-reported studies through coupling a simulator with the particle swarm optimization algorithm. Correlations were proposed using multiple-linear regression for relative permeability and capillary pressure parameters at low-salinity conditions. They were validated against experimental results of no clay and clayey formation with regression of 95% and 97%. To assign one curve of relative permeability and capillary pressure to the grid cells of the simulator, averaging techniques were implemented. The effect of salinity and clay content on the obtained curves was investigated. Changing salinity from 42000 to 4000 ppm, the reduction in water relative permeability appeared to be higher than the oil relative permeability increment. Moreover, a noticeable shift in the relative permeability curves toward the highest saturations related to the clay content was observed. The proposed hybrid method could be a suitable tool to estimate the relative permeability and capillary pressure functions of the water-based EOR methods.


Sandstone core properties
The sandstone core properties are investigated regarding porosity, permeability, clay content, and wettability.Two rock types are selected, and their properties are reported in Table 1: For RTP1, the average core porosity and permeability are reported as 0.3 and 4.5 (Darcy), respectively.For RTP2, the reported values are 0.20 and 1.50 (Darcy), respectively.RTP1 is considered a no clay formation, and RTP2 is a clayey formation.The permeability and porosity correlation for RTP1 and RTP2 is as shown in Fig. 1:

Hybrid particle swarm optimization coupled with machine learning technique for estimating core scale relative permeability and capillary pressure curves
To determine the relative permeability and capillary pressure functions for the LSW process at the core scale, the studies of similar sandstone oil reservoirs are used and categorized into different rock types.These parameters are reported in some studies, but most are not.So, there is a need to determine the matching parameters by coupling the reservoir simulator and PSO algorithm.
Studies similar to our lithology (with and without clay content) are gathered thoroughly.Their properties including formation type, injected brine salinity, wettability, and clay content are investigated and the objective of each study is elaborated.The results are summarized in Tables 2 and 3: Moreover, the distribution of porosity and permeability in the investigated studies are compared to ours as in Fig. 2: After categorizing the conducted studies into two different rock types, the gathered data from these studies is used to determine the HM parameters of both rock types, which will be discussed in the following sections.

Coupling reservoir simulator and PSO algorithm to determine model parameters
If the relative permeability and capillary pressure parameters are not reported directly, the matching parameters must be obtained by coupling the reservoir simulator and the PSO algorithm (AHM).The Coupling procedure to obtain the optimized model parameters is described in 9 steps:     www.nature.com/scientificreports/ In the above equations,k 0 rw/o water/oil endpoint relative permeability and n o/w are Corey exponent parameters, which would be obtained by AHM.
In Eq. 3,a 1 , k 1 ,a 2 , k 2 , and b 1 are correlation parameters.P cowmax in Eq. 4 presents maximum capillary pressure.If the values of relative permeability and capillary pressure are not reported in the investigated studies, the constant parameters of the capillary pressure, along with Corey's equation, would be determined by AHM.
3. Creating include file.4. Run MATLAB coupled with reservoir simulator.5. Post Processing: The exclude file is an Excel file containing the results of oil recovery and pressure drop; other results would be omitted.In HM, rock properties (permeability and porosity), fluid properties (viscosity, compressibility, density, and API), and rock-fluid properties ( k r and P C ) are considered as inputs.If the model result does not match the experimental data, then model parameters are changed using the HM algorithm (PSO), and it is rerun.6.The final purpose is to minimize the difference between the model and experimental results, evaluating the objective function as Eq.5: The model can be used to predict reservoir performance when the difference between predicted ({RF}.{�P})Sim and measured values ({RF}.{�P})Exp is minimized 4 .
7. Optimizing the errors, Pbest (the best solution of particle i) and Gbest (the best solution of all particles) are calculated.8. Creating a new swarm based on Pbest and Gbest.9. Repeating 2-8 steps to reach the lowest error or convergence.
The overall fellow chart of coupling the simulator and PSO to obtain optimized model parameters is shown in Fig. 3: By coupling the simulator and PSO algorithm, experimental results of recovery factor and pressure drop are matched with simulated results, and relative permeability and capillary pressure curves are determined as matching parameters.The summarized variation of optimized parameters for RTP1 is reported in Table 4: The summarized variation of optimized parameters for RTP2 is reported in Table 5: (1)   Similarly, for capillary pressure, matching parameters are also obtained in each study for both rock types.HM parameters reported in Tables 4 and 5 are computed with approximately less than 5% error and a running time of 2.5 h.High salinity relative permeability curves for studies similar to RTP1 and RTP2 were compared with those of our cases.

Proposed correlation for relative permeability parameters (machine learning technique)
Having the matching parameters in two different salinities (high and low), in other low-salinity conditions the relative permeability and capillary pressure parameters were estimated through linear interpolation, and finally by using multi-linear regression, the correlations were developed.
For RTP1 (no clay), the correlations for relative permeability and capillary pressure parameters are proposed using multiple-linear regression as Eqs.6-10 for every desired low-salinity condition (1000-10000 ppm).The experimental conditions for developing correlations include the porosity range of 0.15-0.4,permeability range of 0.01-100 Darcy, mixed wet wettability, and clay-free formation.( 6)  In the above equations, (HSW Concentration) is the concentration of high-salinity water, and (LSW Concentration) is the concentration of low-salinity water.The subscript of each of the coefficients indicates high and low salinity conditions.
For RTP2 (clayey formation), the proposed correlations are as Eqs.11-15 for every desired low-salinity case.The experimental conditions for developing correlations include the porosity range of 0.1-0.35,permeability range of 0.00001-100 Darcy, weakly water wet wettability, and clayey formation.Moreover, these correlations are used for the salinity range between 1000 and 10,000 ppm: Since few similar studies were available, the results of Rivett for RTP1 42 , and Shojaei for RTP2 50 were used to validate the developed correlations and is presented in Table 6: Although the data from these two studies were not used to develop oil and water relative permeability correlations, a suitable match was observed (R 2 = 0.95, MSE = 1.2E-04 for RTP1 and R 2 = 0.97, MSE = 8E-05 for RTP2).Therefore, it is possible to use these proposed correlations to determine the relative permeability and capillary pressure functions at every desired low-salinity condition, within the scope of the mentioned conditions with high accuracy.www.nature.com/scientificreports/

Averaging relative permeability and capillary pressure curves
Among the rock properties, capillary pressure and relative permeability are more challenging, as are functions of fluids' saturation.TEM function is calculated by having relative permeability, permeability, porosity, and viscosity.Equation 24 is similar to the J function and is extensively used to scale the capillary pressure curve 27 .The average relative permeability should be determined for each rock type as a function of the normalized saturation.The weighted relative permeability approach (Eq.25) determines the average relative permeability curve for RTP1 and RTP2.The obtained pseudo relative permeability curve in this method varies between zero and one 27,36 .In Eq. 17, kr a(Ave) is the average phase relative permeability for each rock type, T x is the phase transmissibility, µ a is the phase viscosity, ϕ is the rock's porosity, and k is the rock's absolute permeability.
"The Leverett J" is a dimensionless number relating capillary pressure to rock and fluid properties such as porosity, interfacial tension, and mean pore radius.It is the most common method used for averaging capillary pressure curves and can be calculated using Eq.26 6 : Pc is capillary pressure (psi), σ is the interfacial tension (0.27 dynes/cm), θ is the fluid's contact angle (θ = 0), and J is a dimensionless value.To estimate the average capillary pressure using J-function, the following steps are required: 1. Equation 26 converts the capillary pressure values to the J-function.2. Calculation of the average J-function for a block by using the pore volume averaging is as Eq.27: V i and ϕ i stand for each rock sample's bulk volume and porosity, respectively.
3. The average capillary pressure is finally calculated (Eq.28) by having the average J-function values (Eq.27).

Results
The HSW for our case is 42,000 ppm (sea water).Based on the literature review 3,46,51,[53][54][55][56][57][58][59] , approximately ten times the dilution of HSW could be considered as the optimized salinity.All relative permeability and capillary pressure curves obtained from studies (RTP1 and RTP2) are calculated to a low salinity of 4000 ppm (based on developed correlations).The low-salinity (4000 ppm) relative permeability curves from all studies of RTP1 and RTP2 are shown in Fig. 4a,b:

Averaged relative permeability and capillary pressure curve for a low salinity case
As mentioned, the size of grid cells in the simulator for large-scale applications is much larger than laboratory core plugs where rock properties are measured.Thus, averaging techniques should be used to obtain simulation block properties 6 (Fig. 5).
The obtained pseudo relative permeability curves for RTP1 and RTP2 using the weighted relative permeability approach for a low-salinity case of 4000 ppm are shown in Fig. 6: The average capillary pressure curves for RTP1 and RTP2 for a low-salinity case of 4000 ppm are also illustrated in Fig. 7a,b: www.nature.com/scientificreports/Finally, a single curve for capillary pressure and relative permeability would be assigned to each grid cell within a rock type.

Investigating the effect of salinity and clay content on the obtained averaged curves
The salinity condition of 4000 ppm is considered to determine averaged relative permeability and capillary pressure curves.For RTP1 and RTP2, the comparison of HSW (42,000) and LSW relative permeability curves is shown in Fig. 8a,b: Comparison of HSW and LSW capillary pressure for RTP1 and RTP2 is as Fig. 9a,b:

Discussion
As shown in Fig. 8a,b, as a result of changing salinity from high to low, water relative permeability curves have declined significantly, and oil relative permeability curves have increased.It is noticed that the change in water relative permeability appears to be higher than in the oil relative permeability.Moreover, the relative permeability curve shifted to the right, which implied higher water wettability.For RTP2, due to the clay content, a noticeable shift toward the highest saturations is observed.Moreover, a decrease in residual oil saturation and an increase in irreducible water saturation are also observed, which confirms the water-wetting nature of the rock.As demonstrated in Fig. 9a,b, less negative capillary pressure is obtained by LSW flooding, and thereby, water flood efficiency is improved.A shift in capillary pressure due to clay content is also observed in RTP2 compared to RTP1.Moreover, the capillary pressure of RTP2 has fewer negative parts due to its wetting nature.The obtained averaged low-salinity curves would be assigned to grid cells in the reservoir simulator to investigate the low-salinity flood process at the core and field (after upscaling) scale.
The entire process to achieve averaged relative permeability and capillary pressure curves at a desired lowsalinity condition is shown in Fig. 10: The proposed hybrid method of coupling PSO and machine learning technique for estimating relative permeability and capillary pressure functions could be a suitable tool for core scale simulations of water-based EOR methods, and in particular, low-salinity flooding applications.Moreover, upscaling the obtained averaged low-salinity curves would help investigate the low-salinity flood process at the field scale.

Conclusions
Due to the challenges of obtaining the experimental data of relative permeability and capillary pressure in the low-salinity flood, hybrid particle swarm optimization coupled with a multiple linear regression method is proposed in this study to determine the relative permeability and capillary pressure functions.To this end, the particle swarm optimization algorithm is coupled with a simulator to provide the required data from previously lab-reported studies for low-salinity floods.By having the matching parameters in two different salinities (high  and low), the relative permeability and capillary pressure parameters were estimated through linear interpolation in other low-salinity conditions, and finally, by using multi-linear regression, a set of correlations for relative permeability and capillary pressure functions for low salinity flood were developed.The experimental conditions for developing correlations included the porosity range of 0.15-0.4for rock type 1, and 0.1-0.35 for rock type 2, the permeability range of 0.01-100 Darcy for rock type 1, and 0.00001-100 Darcy for rock type 2, type of wettability (mixed and weakly water wet), salinity range from 1000 to 10000 ppm, and clay content.The weightedrelative permeability approach and the Leverett J function were used as averaging techniques to assign one single curve of relative permeability and capillary pressure.The main results obtained in this study are as follows: • As a result of automatic history matching by coupling particle swarm optimization algorithm and a simulator, relative permeability and capillary pressure parameters were obtained with less than 5% error and a running time of 2.5 h.• The developed correlations were validated against experimental results of no clay rock type and clayey formation rock type with regression of 95% and 97%, and mean square error of 1.2E-04 and 8E-05 respectively.• Based on the obtained averaged relative permeability and capillary pressure curves, the effect of salinity on the results was investigated.By changing salinity from 42000 to 4000 ppm, water relative permeability curves have declined significantly, and oil relative permeability curves have increased.The change in water relative permeability appears to be higher than oil relative permeability.• The effect of clay content on the results was also investigated.For the clayey formation rock type, a noticeable shift toward the highest saturations related to the clay content in the relative permeability and capillary pressure curves was observed.Also, the corresponding capillary pressure curve exhibited fewer negative parts as compared to the no-clay rock type.• The proposed hybrid method could be a suitable tool for core scale simulations of the water-based EOR methods.Upscaling the obtained averaged low-salinity curves would help investigate the low-salinity flood process at the field scale since limited data are available on the subject, which is suggested as future work.

Figure 3 .
Figure 3.The overall fellow chart of coupling the simulator and PSO to obtain optimized model parameters.

Figure 5 .
Figure 5. Averaging process of the relative permeability and capillary pressure curves.

Figure 6 .
Figure 6.Averaging relative permeability model parameters in normalized form for RTP1 (a) and RTP2 (b).

Figure 7 .
Figure 7. Averaging model parameters and converting to averaged Pc for RTP1 (a) and RTP2 (b).

Figure 10 .
Figure 10.Hybrid particle swarm optimization with machine learning technique to achieve averaged relative permeability and capillary pressure curves at a desired low-salinity condition.

Table 1 .
Properties of Rock Type1 and Rock Type2.

Table 2 .
Studies similar to RTP1 and their properties.

Table 3 .
Studies similar to RTP2 and their properties.

Table 4 .
The summarized range of optimized relative permeability parameters for RTP1.

Table 5 .
The summarized range of optimized relative permeability parameters for RTP2.

Table 6 .
Validation of the proposed correlations for RTP1 and RTP2 against reported experimental data.